home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1987 July & August / rerun-1987-07-08.d64 / flash cards (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  210 lines

  1. 10 x=rnd(-ti):s=54272:np=0:dima$(9,5)
  2. 20 w$="flash cards"
  3. 30 poke53281,0:print"[147][158]"
  4. 40 fori=0to24:pokes+i,0:next
  5. 50 fori=1to11:print""spc(14)left$(w$,i):poke53280,i:gosub1330:next
  6. 60 fori=0to9:forj=1to5
  7. 70 reada$(i,j)
  8. 80 next:next
  9. 90 print"[147][129]              flash cards               "
  10. 100 print""spc(5)"[1] addition
  11. 110 [153][166]5)"[2] subtraction
  12. 120 printspc(5)"[3] multiplication
  13. 130 [153][166]5)"[4] division
  14. 140 printspc(5)"[5] mixed
  15. 150 [161]k$:[139]k$[178]""[167]150
  16. 160 t1[178][197](k$):[139]t1[179]1[176]t1[177]5[167]90
  17. 170 t2[178]t1:[139]t1[178]5[167]t2[178]1
  18. 180 :
  19. 190 [153]"loadprint             flash cards                "
  20. 200 [153]"  lower limit of problems (0-9):";
  21. 210 [161]k$:[139]k$[178]""[167]210
  22. 220 r1[178][197](k$):[139]r1[179]0[176]r1[177]9[167]200
  23. 230 [153]k$
  24. 240 [153]"  upper limit of problems (0-9):";
  25. 250 [161]k$:[139]k$[178]""[167]250
  26. 260 r2[178][197](k$):[139]r2[179]0[176]r[177]9[167]240
  27. 270 [153]k$
  28. 280 [139]r1[177]r2[167]190
  29. 290 r2[178]r2[170]1
  30. 300 [139]t1[178]4[176]t1[178]5[175]r1[178]0[175]r2[178]1[167]1460
  31. 310 :
  32. 320 [153]"loadcont             flash cards                "
  33. 330 [153]""[166]5)"playing time (1-9 min): "
  34. 340 [161]k$:[139]k$[178]""[167]340
  35. 350 tm[178][197](k$):[139]tm[179]1[176]tm[177]9[167]320
  36. 360 tm[178]tm[172]100
  37. 370 [153]"loadclr             flash cards                "
  38. 380 [153]""[166]3)"press firewait to move to next problem
  39. 390 printspc(3)"move joytick up[146] for answer
  40. 400 [129]t[178]1[164]2000:[130]
  41. 410 :
  42. 420 ti$[178]"000000"
  43. 430 [145]t1[141]1070,1120,1180,1230,1290
  44. 440 [145]t2[141]620,740,870,990
  45. 450 fb[178][194](56320)[175]16:fr[178]15[171]([194](56320)[175]15)
  46. 460 [139]fr[178]1[167][141]1390
  47. 470 [139][197](ti$)[177]tm[167]540
  48. 480 [139]fb[179][177]0[167]450
  49. 490 np[178]np[170]1:[141]1330
  50. 500 [139]fl[167]np[178]np[171]1
  51. 510 fl[178]0
  52. 520 [139][197](ti$)[179]tm[167]430
  53. 530 :
  54. 540 [153]"loadclr              flash cards               "
  55. 550 [153]""[166]11)"time:"tm[173]100"cmd:00 min"
  56. 560 [153][166]5)"# problems:  "np
  57. 570 [153][166]5)"play again [y/n]
  58. 580 getk$:ifk$=""then580
  59. 590 ifk$="y"thenrun
  60. 600 sys2048:end
  61. 610 :
  62. 620 print"[147][154]         flash cards: addition          "
  63. 630 fori=1to5:printspc(18)a$(x,i):next
  64. 640 print:print
  65. 650 printspc(18)a$(y,1)
  66. 660 printspc(18)a$(y,2)
  67. 670 printspc(13)" [146]";spc(4);a$(y,3)
  68. 680 printspc(12)"   [146]";spc(3);a$(y,4)
  69. 690 printspc(13)" [146]";spc(4);a$(y,5)
  70. 700 print
  71. 710 printspc(12)"           "
  72. 720 return
  73. 730 :
  74. 740 print"[147][153]        flash cards: subtraction        "
  75. 750 ifl=1thenfori=1to5:printspc(18)a$(z,i):next
  76. 760 ifl=2thenfori=1to5:printspc(11)a$(z1,i)spc(2)"[146]"a$(z2,i):next
  77. 770 print:print
  78. 780 printspc(18)a$(y,1)
  79. 790 printspc(18)a$(y,2)
  80. 800 printspc(18)a$(y,3)
  81. 810 printspc(11)"   [146]";spc(4);a$(y,4)
  82. 820 printspc(18)a$(y,5)
  83. 830 print
  84. 840 printspc(10)"             "
  85. 850 return
  86. 860 :
  87. 870 print"[147][159]       flash cards: multiplication      "
  88. 880 fori=1to5:printspc(18)a$(x,i):next
  89. 890 print:print
  90. 900 printspc(18)a$(y,1)
  91. 910 printspc(18)a$(y,2)
  92. 920 printspc(12)"  [146]";spc(3);a$(y,3)
  93. 930 printspc(12)" [146]";spc(3);a$(y,4)
  94. 940 printspc(12)"  [146]";spc(3);a$(y,5)
  95. 950 print
  96. 960 printspc(12)"           "
  97. 970 return
  98. 980 :
  99. 990 print"[147][158]         flash cards: division          "
  100. 1000 printspc(16)"               "
  101. 1010 printspc(16)" "
  102. 1020 ifl=1thenfori=1to5:printspc(9)a$(x,i);" [146]";a$(z,i):next
  103. 1030 ifl=2thenfori=1to5:printspc(9)a$(x,i);" [146]"a$(z1,i)"[146] "a$(z2,i):next
  104. 1040 printspc(16)" "
  105. 1050 return
  106. 1060 :
  107. 1070 x=int(rnd(1)*10)
  108. 1080 y=int(rnd(1)*(r2-r1))+r1
  109. 1090 z=x+y
  110. 1100 return
  111. 1110 :
  112. 1120 x=int(rnd(1)*10)
  113. 1130 y=int(rnd(1)*(r2-r1))+r1
  114. 1140 z=x+y:z$=str$(z):l=len(mid$(z$,2))
  115. 1150 ifl=2thenz1=val(left$(z$,2)):z2=val(right$(z$,1))
  116. 1160 return
  117. 1170 :
  118. 1180 x=int(rnd(1)*10)
  119. 1190 y=int(rnd(1)*(r2-r1))+r1
  120. 1200 z=x*y
  121. 1210 return
  122. 1220 :
  123. 1230 x=int(rnd(1)*(r2-r1))+r1:ifx=0then1230
  124. 1240 y=int(rnd(1)*10)
  125. 1250 z=x*y:z$=str$(z):l=len(mid$(z$,2))
  126. 1260 ifl=2thenz1=val(left$(z$,2)):z2=val(right$(z$,1))
  127. 1270 return
  128. 1280 :
  129. 1290 t2=int(rnd(1)*4)+1
  130. 1300 ont2gosub1070,1120,1180,1230
  131. 1310 return
  132. 1320 :
  133. 1330 pokes+24,15:pokes+6,240:pokes+4,17
  134. 1340 pokes+1,25:pokes,177
  135. 1350 fort=1to20:next
  136. 1360 pokes+4,16
  137. 1370 return
  138. 1380 :
  139. 1390 print""spc(12)"answer:";
  140. 1400 ift2=1thenprintz
  141. 1410 ift2=2thenprintx
  142. 1420 ift2=3thenprintz
  143. 1430 ift2=4thenprinty
  144. 1440 fl=1:return
  145. 1450 :
  146. 1460 print"division by zero not allowed."
  147. 1470 print"please start over by pressing any key."
  148. 1480 getk$:ifk$=""then1480
  149. 1490 run
  150. 1500 :
  151. 1510 data "     "
  152. 1520 data "  "
  153. 1530 data "  "
  154. 1540 data "  "
  155. 1550 data "     "
  156. 1560 :
  157. 1570 data "  "
  158. 1580 data "  "
  159. 1590 data "  "
  160. 1600 data "  "
  161. 1610 data "  "
  162. 1620 :
  163. 1630 data "     "
  164. 1640 data " "
  165. 1650 data "     "
  166. 1660 data " "
  167. 1670 data "     "
  168. 1680 :
  169. 1690 data "     "
  170. 1700 data " "
  171. 1710 data "   "
  172. 1720 data " "
  173. 1730 data "     "
  174. 1740 :
  175. 1750 data "  "
  176. 1760 data "  "
  177. 1770 data "     "
  178. 1780 data " "
  179. 1790 data " "
  180. 1800 :
  181. 1810 data "     "
  182. 1820 data " "
  183. 1830 data "     "
  184. 1840 data " "
  185. 1850 data "     "
  186. 1860 :
  187. 1870 data "     "
  188. 1880 data " "
  189. 1890 data "     "
  190. 1900 data "  "
  191. 1910 data "     "
  192. 1920 :
  193. 1930 data "     "
  194. 1940 data "[169] "
  195. 1950 data "[169] [146][169]"
  196. 1960 data "[169] [146][169] "
  197. 1970 data "  "
  198. 1980 :
  199. 1990 data "     "
  200. 2000 data "  "
  201. 2010 data "     "
  202. 2020 data "  "
  203. 2030 data "     "
  204. 2040 :
  205. 2050 data "     "
  206. 2060 data "  "
  207. 2070 data "     "
  208. 2080 data " "
  209. 2090 data "     "
  210.